<?php
session_start();
$user=$_SESSION['username'];
$room_id=$_REQUEST['room_id'];
include_once '../Model/Room.php';
$room= new Room();
$result=$room->delete_room($room_id);
if($result!='0'){
	$file='../../log/debug/'.date("y-m-d").'.txt';
	$f=fopen($file,'a+');
	if($f){
		fwrite($f,"ROOM_DELETE_SUCCESS: ".$user." ".gmdate('Y-m-d H:i:s')."\r");
	}
}
else {
	$file='../../log/error/'.date("y-m-d").'.txt';
	$f=fopen($file,'a+');
	if($f){
		fwrite($f,"ROOM_DELETE_SUCCESS: ".$user." ".gmdate('Y-m-d H:i:s')."\r");
	}

}
echo $result;
?>